.class Lcn/sharesdk/framework/authorize/j;
.super Ljava/lang/Thread;


# instance fields
.field final synthetic a:Lcn/sharesdk/framework/authorize/g;


# direct methods
.method constructor <init>(Lcn/sharesdk/framework/authorize/g;)V
    .registers 2

    iput-object p1, p0, Lcn/sharesdk/framework/authorize/j;->a:Lcn/sharesdk/framework/authorize/g;

    invoke-direct {p0}, Ljava/lang/Thread;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .registers 4

    const/4 v2, 0x2

    new-instance v0, Lcn/sharesdk/framework/utils/b;

    iget-object v1, p0, Lcn/sharesdk/framework/authorize/j;->a:Lcn/sharesdk/framework/authorize/g;

    invoke-static {v1}, Lcn/sharesdk/framework/authorize/g;->a(Lcn/sharesdk/framework/authorize/g;)Landroid/app/Activity;

    move-result-object v1

    invoke-direct {v0, v1}, Lcn/sharesdk/framework/utils/b;-><init>(Landroid/content/Context;)V

    const-string v1, "none"

    invoke-virtual {v0}, Lcn/sharesdk/framework/utils/b;->l()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_1e

    iget-object v0, p0, Lcn/sharesdk/framework/authorize/j;->a:Lcn/sharesdk/framework/authorize/g;

    invoke-static {v2, v0}, Lcn/sharesdk/framework/utils/UIHandler;->sendEmptyMessage(ILandroid/os/Handler$Callback;)Z

    :goto_1d
    return-void

    :cond_1e
    invoke-static {}, Lcn/sharesdk/framework/ShareSDK;->isRemoveCookieOnAuthorize()Z

    move-result v0

    if-eqz v0, :cond_34

    iget-object v0, p0, Lcn/sharesdk/framework/authorize/j;->a:Lcn/sharesdk/framework/authorize/g;

    invoke-static {v0}, Lcn/sharesdk/framework/authorize/g;->b(Lcn/sharesdk/framework/authorize/g;)Landroid/app/Activity;

    move-result-object v0

    invoke-static {v0}, Landroid/webkit/CookieSyncManager;->createInstance(Landroid/content/Context;)Landroid/webkit/CookieSyncManager;

    invoke-static {}, Landroid/webkit/CookieManager;->getInstance()Landroid/webkit/CookieManager;

    move-result-object v0

    invoke-virtual {v0}, Landroid/webkit/CookieManager;->removeAllCookie()V

    :cond_34
    new-instance v0, Landroid/os/Message;

    invoke-direct {v0}, Landroid/os/Message;-><init>()V

    iput v2, v0, Landroid/os/Message;->what:I

    iget-object v1, p0, Lcn/sharesdk/framework/authorize/j;->a:Lcn/sharesdk/framework/authorize/g;

    iget-object v1, v1, Lcn/sharesdk/framework/authorize/g;->a:Lcn/sharesdk/framework/authorize/AuthorizeHelper;

    invoke-interface {v1}, Lcn/sharesdk/framework/authorize/AuthorizeHelper;->getAuthorizeUrl()Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Landroid/os/Message;->obj:Ljava/lang/Object;

    iget-object v1, p0, Lcn/sharesdk/framework/authorize/j;->a:Lcn/sharesdk/framework/authorize/g;

    invoke-static {v0, v1}, Lcn/sharesdk/framework/utils/UIHandler;->sendMessage(Landroid/os/Message;Landroid/os/Handler$Callback;)Z

    goto :goto_1d
.end method
